<%-- <%@page import="com.po.Goods_favorites"%>
<%@page import="java.util.List"%>
<%@page import="com.po.User"%> --%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>商品收藏</title>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
</head>
<body>
<jsp:include page="/center/header.jsp"></jsp:include>
	<jsp:include page="/center/left.jsp" flush="true"></jsp:include>
  <!--right-->
    <div class="centers_mr">
  <%--   <%User user = (User)request.getSession().getAttribute("user"); %>
     <h1 class="welcom_tm">欢迎您，尊敬的用户     <font><%=user.getUsername() %></font>！当前时间为 <label id="show">显示时间的位置</label></h1>
 --%>    <script type="text/javascript">
//获得当前时间,刻度为一千分一秒
var initializationTime=(new Date()).getTime();
function showLeftTime()
{
var now=new Date();
var year=now.getYear()+1900;
var month=now.getMonth();
var day=now.getDate();
var hours=now.getHours();
var minutes=now.getMinutes();
var seconds=now.getSeconds();
document.getElementById("show").innerHTML=""+year+"年"+month+"月"+day+"日 "+hours+":"+minutes+":"+seconds+"";
//一秒刷新一次显示时间
var timeID=setTimeout(showLeftTime,1000);
}
showLeftTime();
</script>  	<div class="public_m1">
            <div class="public_m2">商品收藏</div>
            <script type="text/javascript">
   			$.ajax({
                url : "<%=path%>"+"/Goods/ListLike.action",
                type : "POST",
                dataType : "json",
                contentType : "application/x-www-form-urlencoded;charset=UTF-8",
            <%--     data : "user_id=<%=user.getId()%>",
   --%>              success : function(data) {
                   if(data){
                	    	 console.log('刷新商品收藏成功 ')
	                     	window.location.reload();//页面刷新
                   }
                }
            });
   			</script>
            <!--收藏开始-->
            <div class="rensw_bejm">
                <ul>
                	<%-- <%
				List<Goods_favorites> likes = (List<Goods_favorites>) request.getSession().getAttribute("likeGoods");
				if (likes != null) {
					for (Goods_favorites like : likes) {
			%>
                    <li>
                    <%if(like.getPic() != null){ %>
                        <img src="<%=path+"/v2/"+like.getPic() %>">
                        <%}else{ %>
                        <img src="<%=path+"/v2/"+"center/mkjlm.jpg" %>">
                        <%} %>
                        <a href="<%=path %>/Goods/GoodsDetail.action?id=<%=like.getGoods_id()%>"><h5><%=like.getGoods_name() %></h5></a>
                        <span>价格：<i><%=like.getPrice() %></i></span>
                    </li>
                    <%}} %> --%>
                </ul>
            </div>
            <div class="public_m6">
                <img src="<%=path %>/v2/center/center/danmgydxm.png">
            </div>
        </div>
                                                   
    </div>
</body>
</html>